Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow authorization URI to be configured as a function #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Kah0ona
Copy link
Contributor

@Kah0ona Kah0ona commented Oct 24, 2021

This PR is created to support the situation where the :authorize-uri has some runtime dependent parts, like a subdomain. Then; one can configure it like so:

  (def profile 
       {:myservice {:authorize-uri (fn [profile request state] ,,,)
                     ,,,}})

Use case:
In my SaaS app, I integrate with Shopify, and their authorize uri is like:
https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={access_mode} where {shop} is dynamic and dependent on the logged in user of my SaaS app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant